package com.scalar.forecast.utils;


import com.scalar.forecast.systemprefs.SystemPreferences;

/**
 * This Class contains Value Object utility methods
 * @author Basha
 * @version 1.0
 */

public class VOUtils
{
   /**
    * This method sets the attributes in the SystemPreferences object to empty whose values are null
    *
    * @param systemPreferences Object whose null values have to be set to empty
    */

    public static void setSystemPreferencesNullValuesToEmpty( SystemPreferences systemPreferences  )
    {
        if( systemPreferences.getCanBuildMasterCanOverrideSFC() == null )
        {
            systemPreferences.setCanBuildMasterCanOverrideSFC( "" );
        }
        if( systemPreferences.getPartNumberType() == null )
        {
            systemPreferences.setPartNumberType( "" );
        }
        if( systemPreferences.getmModifeidBy() ==  null )
        {
            systemPreferences.setModifeidBy ( "" );
        }
        if( systemPreferences.getModifiedOn() == null )
        {
            systemPreferences.setModifiedOn( "" );
        }
    }
}
